﻿using System.Threading.Tasks;
using Ebusiness_Framework.Consul;
using Ebusiness_Framework.SkyAPMConfig;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Volo.Abp;
using Volo.Abp.Modularity;

namespace Ebusiness_Framework;

[DependsOn(

)]
public class Ebusiness_FrameworkModule : AbpModule
{
    /// <summary>
    /// 
    /// </summary>
    /// <param name="context"></param>
    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        var configuration = context.Services.GetConfiguration();
        IServiceCollection serviceDescriptors = context.Services;
        //配置注册中心
        //context.Services.AddConsul(configuration);
        ////配置链路监控
        //context.Services.UserSkyAPM();
    }

    /// <summary>
    /// 
    /// </summary>
    /// <param name="context"></param>
    public override void OnApplicationInitialization(ApplicationInitializationContext context)
    {
        var app = context.GetApplicationBuilder();
        //app.UseHealthChecks("/health");
    }
}
